package nl.maarten.docenthelp.entity;


public class Problem
{
	private int id;
	
	private User user;
	
	private Category category;
	
	private boolean corrected;
	
	private boolean update = false;
	
	public Problem( int id, User user, Category category, boolean corrected )
	{
		this.id = id;
		this.user = user;
		this.category = category;
		this.corrected = corrected;
	}
	
	public int getID()
	{
		return id;
	}
	
	public User getUser()
	{
		return user;
	}
	
	public Category getCategory()
	{
		return category;
	}
	
	public boolean isCorrected()
	{
		return corrected;
	}
	
	public void setCorrected( boolean corrected )
	{
		this.corrected = corrected;
	}
	
	public void save()
	{
		update = true;
	}
	
	public boolean needsUpdate()
	{
		return update;
	}
	
	public void updated()
	{
		update = false;
	}
}
